package cn.exlu.coco.core.utils;

import java.text.DecimalFormat;


public class NumberUtil {
    private final static DecimalFormat df_00 = new DecimalFormat("0.00");

    public final static double multiplyMoney(int val1, double val2){
        return Double.valueOf(df_00.format(val1 * val2));
    }
    
    public final static double toFixed(double val, int sacle){
        if(sacle == 2){
            return Double.valueOf(df_00.format(val));
        }
        
        return val;
    }

}
